Skip to content

Conversation

@yurivict
Copy link
Contributor

No description provided.

@github-actions github-actions bot added the ggml changes relating to the ggml tensor library for machine learning label Apr 11, 2025
@yurivict yurivict force-pushed the FreeBSD-cpu-model branch from add4dae to 9b6b704 Compare April 11, 2025 17:43
Comment on lines +29 to +31
#include <errno.h>
#include <string.h>
#include <iostream>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unless necessary for something else in this file, remove these includes.

Suggested change
#include <errno.h>
#include <string.h>
#include <iostream>

Comment on lines +300 to +303
if (rc == 0)
description = buf;
else
std::cerr << "error: sysctlbyname(hw.model) failed: " << strerror(errno) << std::endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
if (rc == 0)
description = buf;
else
std::cerr << "error: sysctlbyname(hw.model) failed: " << strerror(errno) << std::endl;
if (rc == 0) {
description = buf;
}

@yurivict
Copy link
Contributor Author

@slaren

Unless necessary for something else in this file, remove these includes.

It's unlikely, but what if this system call would fail for some odd reason, like resource exhaustion.
Why should it go unreported?
System calls can fail for any reason, the manpage lists a lot of reasons of possible failures.

@slaren
Copy link
Member

slaren commented Apr 14, 2025

The most important reason is for consistency with the rest of the code. This is not a critical function and it doesn't matter if it fails.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ggml changes relating to the ggml tensor library for machine learning

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants